3.2 \(\int \frac{\cos ^3(x)}{i+\cot (x)} \, dx\)

Optimal. Leaf size=29 \[ \frac{1}{5} i \sin ^5(x)-\frac{1}{3} i \sin ^3(x)-\frac{1}{5} \cos ^5(x) \]

[Out]

-Cos[x]^5/5 - (I/3)*Sin[x]^3 + (I/5)*Sin[x]^5

________________________________________________________________________________________

Rubi [A]  time = 0.160735, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 7, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.538, Rules used = {3518, 3108, 3107, 2565, 30, 2564, 14} \[ \frac{1}{5} i \sin ^5(x)-\frac{1}{3} i \sin ^3(x)-\frac{1}{5} \cos ^5(x) \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]^3/(I + Cot[x]),x]

[Out]

-Cos[x]^5/5 - (I/3)*Sin[x]^3 + (I/5)*Sin[x]^5

Rule 3518

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[(Sin[e + f*x]
^m*(a*Cos[e + f*x] + b*Sin[e + f*x])^n)/Cos[e + f*x]^n, x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
 ILtQ[n, 0] && ((LtQ[m, 5] && GtQ[n, -4]) || (EqQ[m, 5] && EqQ[n, -1]))

Rule 3108

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_), x_Symbol] :> Dist[a^p*b^p, Int[(Cos[c + d*x]^m*Sin[c + d*x]^n)/(b*Cos[c + d*x] + a*Sin
[c + d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[a^2 + b^2, 0] && ILtQ[p, 0]

Rule 3107

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_.), x_Symbol] :> Int[ExpandTrig[cos[c + d*x]^m*sin[c + d*x]^n*(a*cos[c + d*x] + b*sin[c +
 d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && IGtQ[p, 0]

Rule 2565

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2564

Int[cos[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(a*f), Subst[Int[
x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Sin[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] &&
 !(IntegerQ[(m - 1)/2] && LtQ[0, m, n])

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \frac{\cos ^3(x)}{i+\cot (x)} \, dx &=-\int \frac{\cos ^3(x) \sin (x)}{-\cos (x)-i \sin (x)} \, dx\\ &=i \int \cos ^3(x) (-i \cos (x)-\sin (x)) \sin (x) \, dx\\ &=i \int \left (-i \cos ^4(x) \sin (x)-\cos ^3(x) \sin ^2(x)\right ) \, dx\\ &=-\left (i \int \cos ^3(x) \sin ^2(x) \, dx\right )+\int \cos ^4(x) \sin (x) \, dx\\ &=-\left (i \operatorname{Subst}\left (\int x^2 \left (1-x^2\right ) \, dx,x,\sin (x)\right )\right )-\operatorname{Subst}\left (\int x^4 \, dx,x,\cos (x)\right )\\ &=-\frac{1}{5} \cos ^5(x)-i \operatorname{Subst}\left (\int \left (x^2-x^4\right ) \, dx,x,\sin (x)\right )\\ &=-\frac{1}{5} \cos ^5(x)-\frac{1}{3} i \sin ^3(x)+\frac{1}{5} i \sin ^5(x)\\ \end{align*}

Mathematica [A]  time = 0.0927364, size = 42, normalized size = 1.45 \[ -\frac{\csc (x) (i (10 \sin (2 x)+\sin (4 x))+20 \cos (2 x)+4 \cos (4 x))}{120 (\cot (x)+i)} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]^3/(I + Cot[x]),x]

[Out]

-(Csc[x]*(20*Cos[2*x] + 4*Cos[4*x] + I*(10*Sin[2*x] + Sin[4*x])))/(120*(I + Cot[x]))

________________________________________________________________________________________

Maple [B]  time = 0.046, size = 93, normalized size = 3.2 \begin{align*}{{\frac{i}{6}} \left ( \tan \left ({\frac{x}{2}} \right ) +i \right ) ^{-3}}-{{\frac{3\,i}{8}} \left ( \tan \left ({\frac{x}{2}} \right ) +i \right ) ^{-1}}-{\frac{1}{4} \left ( \tan \left ({\frac{x}{2}} \right ) +i \right ) ^{-2}}-{{\frac{4\,i}{3}} \left ( \tan \left ({\frac{x}{2}} \right ) -i \right ) ^{-3}}+{{\frac{3\,i}{8}} \left ( \tan \left ({\frac{x}{2}} \right ) -i \right ) ^{-1}}+{{\frac{2\,i}{5}} \left ( \tan \left ({\frac{x}{2}} \right ) -i \right ) ^{-5}}+ \left ( \tan \left ({\frac{x}{2}} \right ) -i \right ) ^{-4}- \left ( \tan \left ({\frac{x}{2}} \right ) -i \right ) ^{-2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^3/(I+cot(x)),x)

[Out]

1/6*I/(tan(1/2*x)+I)^3-3/8*I/(tan(1/2*x)+I)-1/4/(tan(1/2*x)+I)^2-4/3*I/(tan(1/2*x)-I)^3+3/8*I/(tan(1/2*x)-I)+2
/5*I/(tan(1/2*x)-I)^5+1/(tan(1/2*x)-I)^4-1/(tan(1/2*x)-I)^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(I+cot(x)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [B]  time = 1.62988, size = 170, normalized size = 5.86 \begin{align*} -\frac{1}{240} \,{\left (5 \,{\left (e^{\left (6 i \, x\right )} + 9 \, e^{\left (4 i \, x\right )} - 9 \, e^{\left (2 i \, x\right )} - 1\right )} e^{\left (2 i \, x\right )} - 15 \, e^{\left (6 i \, x\right )} + 45 \, e^{\left (4 i \, x\right )} + 15 \, e^{\left (2 i \, x\right )} + 3\right )} e^{\left (-5 i \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(I+cot(x)),x, algorithm="fricas")

[Out]

-1/240*(5*(e^(6*I*x) + 9*e^(4*I*x) - 9*e^(2*I*x) - 1)*e^(2*I*x) - 15*e^(6*I*x) + 45*e^(4*I*x) + 15*e^(2*I*x) +
 3)*e^(-5*I*x)

________________________________________________________________________________________

Sympy [A]  time = 0.508481, size = 36, normalized size = 1.24 \begin{align*} - \frac{e^{3 i x}}{48} - \frac{e^{i x}}{8} - \frac{e^{- 3 i x}}{24} - \frac{e^{- 5 i x}}{80} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)**3/(I+cot(x)),x)

[Out]

-exp(3*I*x)/48 - exp(I*x)/8 - exp(-3*I*x)/24 - exp(-5*I*x)/80

________________________________________________________________________________________

Giac [B]  time = 1.22324, size = 93, normalized size = 3.21 \begin{align*} -\frac{9 i \, \tan \left (\frac{1}{2} \, x\right )^{2} - 12 \, \tan \left (\frac{1}{2} \, x\right ) - 7 i}{24 \,{\left (\tan \left (\frac{1}{2} \, x\right ) + i\right )}^{3}} - \frac{-45 i \, \tan \left (\frac{1}{2} \, x\right )^{4} - 60 \, \tan \left (\frac{1}{2} \, x\right )^{3} + 70 i \, \tan \left (\frac{1}{2} \, x\right )^{2} + 20 \, \tan \left (\frac{1}{2} \, x\right ) - 13 i}{120 \,{\left (\tan \left (\frac{1}{2} \, x\right ) - i\right )}^{5}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(I+cot(x)),x, algorithm="giac")

[Out]

-1/24*(9*I*tan(1/2*x)^2 - 12*tan(1/2*x) - 7*I)/(tan(1/2*x) + I)^3 - 1/120*(-45*I*tan(1/2*x)^4 - 60*tan(1/2*x)^
3 + 70*I*tan(1/2*x)^2 + 20*tan(1/2*x) - 13*I)/(tan(1/2*x) - I)^5